import request from '@/utils/request'
export default class index {
  static getAdmins(data: { page: number; limit: number; sort: string; is_del: string }) {
    return request({
      url: 'api/users',
      method: 'get',
      params: data
    })
  };
  static deleteAdmin(id: any) {
    return request({
      url: `api/users/${id}`,
      method: 'delete'
    })
  }
  static addAdmin(data: { id: number; name: string; password: string; checkedCities: never[]; password_confirmation: string }) {
    return request({
      url: 'api/users',
      method: 'post',
      data
    })
  }
  static updateAdmin(key: number, data: { id: number; name: string; password: string; checkedCities: never[]; password_confirmation: string }) {
    return request({
      url: `api/users/${key}`,
      method: 'put',
      data
    })
  }
  static getLogs(query: any) {
    return request({
      url: 'api/users/logs',
      method: 'get',
      params: query
    })
  }
  static getAdminsList() {
    return request({
      url: 'api/users/list',
      method: 'get'
    })
  }
  // 直播管理后台操作日志 功能描述列表
  static getcatesList() {
    return request({
      url: 'api/operation/cates',
      method: 'get'
    })
  }
  // 直播管理后台操作日志 日志列表
  static getAdminLogsList(params: any) {
    return request({
      url: 'api/operation/list',
      method: 'get',
      params
    })
  }
  // 直播管理后台操作日志 操作员列表
  static getAdminUserList(params: any) {
    return request({
      url: 'api/operation/users',
      method: 'get',
      params
    })
  }
}